package com.smforj.ssm.modules.lib.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.smforj.ssm.frame.core.dao.impl.BaseDaoSupport;
import com.smforj.ssm.frame.core.enums.JDataSource;
import com.smforj.ssm.modules.eslib.domain.BookExtends;
import com.smforj.ssm.modules.eslib.domain.LibBook;
import com.smforj.ssm.modules.eslib.domain.vo.LibBookVo;
import com.smforj.ssm.modules.lib.constant.ADataSource;
import com.smforj.ssm.modules.lib.dao.LibBookDao;

@Repository
@JDataSource(ADataSource.SLAVE1)
public class LibBookDaoImpl extends BaseDaoSupport<LibBook> implements LibBookDao {

	@Override
	public LibBookVo getBookBytstm(String tstm) {  
		return getSqlSessionTemplate().selectOne(getSqlName("getBookBytstm"), tstm); 
	}

	@Override
	public BookExtends getBookExtends(String flh, String dzlb) { 
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("flh", flh);
		params.put("dzlb", dzlb);
		return getSqlSessionTemplate().selectOne(getSqlName("getBookExtends"), params); 
	} 

}
